import java.util.Scanner;

public class OrderApp {

    // 枚举：定义可选食物
    public enum Food {
        BURGER(25),
        PIZZA(35),
        NOODLES(20);

        private final int price;

        // 构造器：每种食物对应价格
        Food(int price) {
            this.price = price;
        }

        public int getPrice() {
            return price;
        }
    }

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        // 显示菜单
        System.out.println("欢迎点餐 🍽️，请从以下菜单中选择：");
        for (Food food : Food.values()) {
            System.out.println("- " + food.name() + "（¥" + food.getPrice() + "）");
        }

        // 用户输入
        System.out.print("请输入您要点的食物名称（英文）：");
        String input = scanner.nextLine().toUpperCase();

        try {
            Food selected = Food.valueOf(input); // 将字符串转换为枚举值

            System.out.println("✅ 您点的是：" + selected.name());
            System.out.println("💰 价格是：¥" + selected.getPrice());

        } catch (IllegalArgumentException e) {
            System.out.println("❌ 输入错误！菜单中没有这个食物。");
        }

        scanner.close();
    }
}
